package com.uyii.springbootsensitive.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.uyii.springbootsensitive.annottion.Sensitive;
import com.uyii.springbootsensitive.serializer.SensitiveSerializer;
import lombok.Data;

@Data
public class User {

    private String id;

    private String name;

    @Sensitive(type = "EMAIL")
    @JsonSerialize(using = SensitiveSerializer.class)
    private String email;

    @Sensitive(type = "PHONE")
    @JsonSerialize(using = SensitiveSerializer.class)
    private String phone;
}